﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Quotation.ETF
{
    public class BasicInfo
    {
        /// <summary>
        /// 基金ID
        /// </summary>
        public SymbolCode FundId { get; set; }

        /// <summary>
        /// 本市场的现金替代代码
        /// </summary>
        public string LocalExchCashId { get; set; }

        /// <summary>
        /// 非本市场的现金替代代码
        /// </summary>
        public string OtherExchCashId { get; set; }

        /// <summary>
        /// 基金名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        ///  最小赎回单位
        /// </summary>
        public int CreationRedemptionUnit { get; set; }

        /// <summary>
        /// 成分股总数量
        /// </summary>
        public int ComponentStockQty { get; set; }

        /// <summary>
        /// 申购买卖控制标志
        /// </summary>
        public char CreationFlag { get; set; }

        /// <summary>
        /// T日预估现金余额
        /// </summary>
        public double EstimateSettlementCashAmt { get; set; }

        /// <summary>
        /// T-1日申购赎回现金差额
        /// </summary>
        public double SettlementCashAmt { get; set; }

        /// <summary>
        /// ETF类型
        /// </summary>
        public ETFType ETFType { get; set; }

        /// <summary>
        /// 基金市场代码
        /// </summary>
        public ETFMarket FundMarket { get; set; }

        /// <summary>
        /// 本所成分股数量
        /// </summary>
        public int LocalExchStkCount { get; set; }

        /// <summary>
        /// 非本所成分股数量
        /// </summary>
        public int OtherExchStkCount { get; set; }

        /// <summary>
        /// 跨境(无行情)替代总金额
        /// </summary>
        public double ExternalTotalAmount { get; set; }

        /// <summary>
        /// 交易日
        /// </summary>
        public Date TradeDate { get; set; }

        /// <summary>
        /// 前一交易日
        /// </summary>
        public Date PreTradeDate { get; set; }

        /// <summary>
        /// 赎回买卖控制标志
        /// </summary>
        public char RedemptionFlag { get; set; }

        /// <summary>
        /// 证券代码
        /// </summary>
        public SymbolCode StkId { get; set; }

        /// <summary>
        /// 总金额
        /// </summary>
        public double TotalAmt { get; set; }

        /// <summary>
        /// 成分股
        /// </summary>
        public List<ETFComponent> Components { get; set; }

        /// <summary>
        /// 最大现金替代比例
        /// </summary>
        public double MaxCashRatio { get; set; }

        /// <summary>
        /// 前一日基金份额净值
        /// </summary>
        public double NAV { get; set; }

        /// <summary>
        /// 前一日最小申赎单位净值
        /// </summary>
        public double NAVperCU { get; set; }

        /// <summary>
        /// 版本
        /// </summary>
        public Int64 Version { get; set; }

        /// <summary>
        /// 信息更新时间
        /// </summary>
        public DateTime UpdateTime { get; set; }
    }

    /// <summary>
    /// 表示ETF清单中的成分股
    /// </summary>
    public class ETFComponent
    {
        /// <summary>
        /// 商品ID
        /// </summary>
        public SymbolCode StkId;
        /// <summary>
        /// 商品名称
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 证券数量
        /// </summary>
        public int ExecuteQty { get; set; }

        /// <summary>
        /// 申购替代金额
        /// </summary>
        public double ApplyCashReplaceAmt { get; set; }
        /// <summary>
        /// 赎回替代金额
        /// </summary>
        public double RedemptionCashReplaceAmt { get; set; }

        /// <summary>
        /// 溢价比例
        /// </summary>
        public double PremiumRate { get; set; }

        /// <summary>
        /// 替代标志
        /// </summary>
        public char ReplaceFlag { get; set; }

        /// <summary>
        /// 允许交易标志
        /// </summary>
        public char TradeFlag { get; set; }

       
    }
}
